<%@ page import="cn.jee.jsp.domain.Stu" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>编辑学生</title>
</head>
<body>
<%
    Object msg=session.getAttribute("edit_stu_msg");
    if(msg!=null){
      out.println("<p style='color:red'>"+msg+"</p>");
      session.removeAttribute("edit_stu_msg");
    }
%>
<%
    Object stuObj=session.getAttribute("stu");
    if(stuObj==null){
      out.println("没有学生数据");
      return;
    }
    Stu stu=(Stu)stuObj;

%>
<form action="<%=request.getContextPath()%>/updateStu">
    <input type="hidden" name="id" value="<%=stu.getId()%>">
    姓名：<input type="text" name="name" required value="<%=stu.getName()%>"><br>
    java: <input type="number" name="java" required min="0" max="100" value="<%=stu.getJava()%>"><br>
    math: <input type="number" name="math" required min="0" max="100" value="<%=stu.getMath()%>"><br>
    <input type="submit" value="更新">
</form>
</body>
</html>
